<template>
	<view class="pass">
		<view class="pass-1">
			<text>请输入6位支付密码</text>
		</view>
		<view class="pass-2">
			<view class="pass-mm" v-for="(item,index) in index" :key="item">
				{{val[index]||``}}
			</view>
			<input class="inp" type="hidden" :maxlength="6" v-model="val" @input="password(val)"/>
		</view>
		<view class="pass-3">
			<text>选择其他方式验证</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				index: 6,
				val: ""
			}
		},
		methods: {
			password(val) {
				let length=val.length
				if (length == 6) {
					uni.navigateTo({
						url: "./Borrow"
					})
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	.pass {
		width: 750rpx;
		box-sizing: border-box;
		padding: 0rpx 40rpx;

		.pass-1 {
			width: 100%;
			height: 300rpx;
			text-align: center;
			line-height: 400rpx;
			font-size: 32rpx;
			font-weight: 600;
		}

		.pass-2 {
			position: relative;
			width: 100%;
			height: 100rpx;
			display: flex;
			justify-content: space-between;
			text-align: center;
			line-height: 100rpx;
			font-size: 40rpx;
			font-weight: 700;

			.pass-mm {
				width: 15%;
				height: 100%;
				border: 2px solid #5880f6;

			}

			.inp {
				color: rgba(255, 255, 255, 0);
				position: absolute;
				width: 100%;
				height: 100%;

			}
		}

		.pass-3 {
			text-align: center;
			line-height: 50rpx;
			margin-top: 40rpx;
			color: #5880f6;
			font-size: 32rpx;
			font-weight: 600;
			width: 100%;
			height: 50rpx;
		}
	}
</style>
